Optimal. Leaf size=81 \[ -\frac{\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a^2 \sqrt{b^2-4 a c}}+\frac{b \log \left (a+b x+c x^2\right )}{2 a^2}-\frac{b \log (x)}{a^2}-\frac{1}{a x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0976829, antiderivative size = 81, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.389, Rules used = {1594, 709, 800, 634, 618, 206, 628} \[ -\frac{\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a^2 \sqrt{b^2-4 a c}}+\frac{b \log \left (a+b x+c x^2\right )}{2 a^2}-\frac{b \log (x)}{a^2}-\frac{1}{a x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1594
Rule 709
Rule 800
Rule 634
Rule 618
Rule 206
Rule 628
Rubi steps
\begin{align*} \int \frac{1}{a x^2+b x^3+c x^4} \, dx &=\int \frac{1}{x^2 \left (a+b x+c x^2\right )} \, dx\\ &=-\frac{1}{a x}+\frac{\int \frac{-b-c x}{x \left (a+b x+c x^2\right )} \, dx}{a}\\ &=-\frac{1}{a x}+\frac{\int \left (-\frac{b}{a x}+\frac{b^2-a c+b c x}{a \left (a+b x+c x^2\right )}\right ) \, dx}{a}\\ &=-\frac{1}{a x}-\frac{b \log (x)}{a^2}+\frac{\int \frac{b^2-a c+b c x}{a+b x+c x^2} \, dx}{a^2}\\ &=-\frac{1}{a x}-\frac{b \log (x)}{a^2}+\frac{b \int \frac{b+2 c x}{a+b x+c x^2} \, dx}{2 a^2}+\frac{\left (b^2-2 a c\right ) \int \frac{1}{a+b x+c x^2} \, dx}{2 a^2}\\ &=-\frac{1}{a x}-\frac{b \log (x)}{a^2}+\frac{b \log \left (a+b x+c x^2\right )}{2 a^2}-\frac{\left (b^2-2 a c\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{a^2}\\ &=-\frac{1}{a x}-\frac{\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a^2 \sqrt{b^2-4 a c}}-\frac{b \log (x)}{a^2}+\frac{b \log \left (a+b x+c x^2\right )}{2 a^2}\\ \end{align*}
Mathematica [A] time = 0.0789887, size = 77, normalized size = 0.95 \[ \frac{\frac{2 \left (b^2-2 a c\right ) \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right )}{\sqrt{4 a c-b^2}}+b \log (a+x (b+c x))-\frac{2 a}{x}-2 b \log (x)}{2 a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 112, normalized size = 1.4 \begin{align*} -{\frac{1}{ax}}-{\frac{b\ln \left ( x \right ) }{{a}^{2}}}+{\frac{b\ln \left ( c{x}^{2}+bx+a \right ) }{2\,{a}^{2}}}-2\,{\frac{c}{a\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{{b}^{2}}{{a}^{2}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.77597, size = 626, normalized size = 7.73 \begin{align*} \left [-\frac{{\left (b^{2} - 2 \, a c\right )} \sqrt{b^{2} - 4 \, a c} x \log \left (\frac{2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c + \sqrt{b^{2} - 4 \, a c}{\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) + 2 \, a b^{2} - 8 \, a^{2} c -{\left (b^{3} - 4 \, a b c\right )} x \log \left (c x^{2} + b x + a\right ) + 2 \,{\left (b^{3} - 4 \, a b c\right )} x \log \left (x\right )}{2 \,{\left (a^{2} b^{2} - 4 \, a^{3} c\right )} x}, -\frac{2 \,{\left (b^{2} - 2 \, a c\right )} \sqrt{-b^{2} + 4 \, a c} x \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + 2 \, a b^{2} - 8 \, a^{2} c -{\left (b^{3} - 4 \, a b c\right )} x \log \left (c x^{2} + b x + a\right ) + 2 \,{\left (b^{3} - 4 \, a b c\right )} x \log \left (x\right )}{2 \,{\left (a^{2} b^{2} - 4 \, a^{3} c\right )} x}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 3.50723, size = 862, normalized size = 10.64 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.09282, size = 107, normalized size = 1.32 \begin{align*} \frac{b \log \left (c x^{2} + b x + a\right )}{2 \, a^{2}} - \frac{b \log \left ({\left | x \right |}\right )}{a^{2}} + \frac{{\left (b^{2} - 2 \, a c\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} a^{2}} - \frac{1}{a x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]